Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ephemeral warnings #521

Merged
merged 4 commits into from
Aug 8, 2022
Merged

fix: ephemeral warnings #521

merged 4 commits into from
Aug 8, 2022

Conversation

Vyvy-vi
Copy link
Collaborator

@Vyvy-vi Vyvy-vi commented Jul 23, 2022

Partially fixes #496

This PR turns the warnings sent after the initial praise message into one ephemeral reply.
Screenshot 2022-07-23 at 8 27 58 PM
Screenshot 2022-07-23 at 8 27 33 PM


While this solves the issue for the warnings sent after the first praise bot response(success / failure), the initial error messages can't be made ephemeral in a neat way as we want variable behaviour from that message:

  1. We want to defer it so we have 15 minutes to run the praise logic. At this stage, we need to specify if that message is ephemeral.
  2. If the praise process is successful we want to edit the temporary deferred reply with new message content, which is publicly visible.
  3. If the praise process is unsuccessful we want to edit the temporary deferred reply with new message content displaying errors, which is private(ephemeral).

The can't change the state of an already deferred message. A potential solution can be - Not updating the deferred reply with the error and send a response like:

🤞 <@praiseGiver>, we were unable to praise <@receivers[]> for <reason>

and then send an ephemeral followup with the error details that is private.

Would the above be a desirable solution, or should we refactor the way the bot sends responses(might turn into a mess)?

@Vyvy-vi Vyvy-vi marked this pull request as draft July 26, 2022 10:07
@Vyvy-vi
Copy link
Collaborator Author

Vyvy-vi commented Jul 26, 2022

this has to be merged after #459 is merged in.

@Vyvy-vi Vyvy-vi marked this pull request as ready for review August 1, 2022 07:08
Copy link
Member

@kristoferlund kristoferlund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Merging.

@kristoferlund kristoferlund merged commit e34da81 into main Aug 8, 2022
@kristoferlund kristoferlund deleted the feat/ephemeral-warnings branch August 16, 2022 17:38
@kristoferlund kristoferlund mentioned this pull request Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some praise bot messages that currently are public should most likely be ephemeral
2 participants